Skip to main content

Update the contact

2 minute read                                                                                                                         Beginner


Glific has some predefined variables to use. Organisations can also define their custom variables when needed. It is recommended not to have many custom variables defined. Anything under 20 is good number of custom variables.


Prerequisites


Video Tutorial


Define Custom Variables

1 . Create or edit a flow.

image

2 . In Wait for response node define the variable name in result name section. In this example variable name is schoolname .

(Note: Please use variable name in lowercase and it should be without any space in between two words. You can use underscore "" if you want to put in the name)._

image


Update the Contact

1 . Next to wait for response node and another update contactnode.

2 . Enter variable name in Select what to update section.

We suggest to keep the variable name same to avoid any confusion. You can keep this name different also. Note - The value in the update contact will be save with this variable name.

3 . Enter the syntax of the variable name defined in wait for response section . It should be written as @results.variable name. Like in this example it will be @results.schoolname

4 . If you would like to store the category instead of the value, you can use @results.variable name.category. Like in this example it will be @results.schoolname.category

image


Access Contact Update Variables

1 . To access the updates value in the contact details you can use syntax @contact.fields.schoolnamein the next node.

image

2 . Execute the flow and verify the updated value shown in the chat or simulator screen.

image


Tags

  • Custom Variables
  • Update Contact
  • Defining Custom Variables